
const URL = 'http://192.168.3.224:8099'

const http=({url,data={},method='get'})=>{
	if(!url)return;
	let p = new Promise((resolve,reject)=>{
		wx.request({
			url:URL+url,
			data,
			method,
			success(res){
				resolve(res)
			},
			fail(err){
				reject(err)
			}
		})
	})
	return p;
}

export default http;